Block-chain enabled service provider system

ABSTRACT

A distributed ledger, e.g., blockchain, enabled operating environment includes a user device that accesses services of a service device by leveraging the decentralized blockchain. For example, a user device can lock/unlock a door (e.g., service device) by interfacing with a smart contract stored on the decentralized blockchain. The user device provides parameters, such as payment, that satisfies the variables of the smart contract such that the user device can access the service device. The service device regularly retrieves information stored in the smart contract on the decentralized blockchain. For example, the retrieved information can specify that the user device is authorized to access the service device or that the service device is to provide a service. Therefore, given the retrieved information, the service device provides the service to the user device.

CROSS REFERENCE TO RELATED APPLICATIONS

This application is a continuation of U.S. patent application Ser. No.15/857,334, filed Dec. 28, 2017 which claims a benefit of U.S.Provisional Patent Application No. 62/441,013, filed Dec. 30, 2016, thecontent of which is incorporated by reference in its entirety.

TECHNICAL FIELD

This disclosure relates generally to exchanges, and more specifically,to controlling a service device, e.g., a hardware component, byperforming an exchange on a decentralized ledger, e.g., a blockchain.

BACKGROUND

Exchanges using computing systems are often unsecure and prone toundesired alterations. If a particular exchange is compromised, it maybe difficult to detect that the specific transaction is compromised.This leads to significant losses in terms of resources (e.g., money,human effort, time, etc.).

In many scenarios, the source of the hacking can arise from a middle manthat handles the exchange. As an example, after booking a hotel room, anindividual would need to interact with the desk attendant to pick up thekeys to the hotel room. Here, the desk attendant can readily switch thehotel room to a smaller or less desirable hotel room than the one thatwas booked. Such a switch may not be readily evident to the individual.Thus, there is a need for ensuring safe transactions through the removalof the middle man that handles the exchanges.

BRIEF DESCRIPTION OF THE DRAWINGS

The disclosed embodiments have other advantages and features which willbe more readily apparent from the following detailed description and theappended claims, when taken in conjunction with the accompanyingdrawings, in which:

Figure (FIG. 1A depicts an example blockchain enabled operatingenvironment, in accordance with a first embodiment.

FIG. 1B depicts underlying processes on a blockchain that enable theprovision of a service from a service device, in accordance with anembodiment.

FIG. 1C is a block diagram illustrating example components of an examplecomputing device within the blockchain enabled operating environment, inaccordance with an embodiment.

FIG. 2 is an example interaction diagram that depicts the bookingprocess, in accordance with an embodiment.

FIG. 3 is an example interaction diagram that depicts the accessprocess, in accordance with a first embodiment.

FIG. 4A depicts an example blockchain enabled operating environment, inaccordance with a second embodiment.

FIG. 4B is an example interaction diagram that depicts the accessprocess, in accordance with the second embodiment shown in FIG. 4A.

FIG. 5A is an example interaction diagram that depicts the accessprocess using a proxy device, in accordance with an embodiment.

FIG. 5B depicts an example of hardware and software layers of a proxydevice, in accordance with an embodiment.

FIG. 6 depicts an interaction diagram that depicts the use of statechannels, in accordance with an embodiment.

FIG. 7A depicts a service device that accesses the blockchain through auser device, in accordance with an embodiment.

FIG. 7B is an interaction diagram that depicts the interactions betweenthe service device, user device, and trusted client, in accordance withthe embodiment shown in FIG. 7A.

DETAILED DESCRIPTION

The figures and the following description relate to preferredembodiments by way of illustration only. It should be noted that fromthe following discussion, alternative embodiments of the structures andmethods disclosed herein will be readily recognized as viablealternatives that may be employed without departing from the principlesof what is claimed.

Reference will now be made in detail to several embodiments, examples ofwhich are illustrated in the accompanying figures. It is noted thatwherever practicable similar or like reference numbers may be used inthe figures and may indicate similar or like functionality. The figuresdepict embodiments of the disclosed system (or method) for purposes ofillustration only. One skilled in the art will readily recognize fromthe following description that alternative embodiments of the structuresand methods illustrated herein may be employed without departing fromthe principles described herein.

Example Decentralized Ledger Enabled Operating Environment

This disclosure describes methods and systems for controlling a servicedevice such as a lock, which can be opened by providing a payment, thepayment being handled not through a central entity/server, but throughcode performing on a decentralized ledger (e.g., blockchain). For easeof discussion, the disclosed configurations will be described in thecontext of a blockchain, although the principals noted may be applicableto other decentralized ledgers.

FIG. 1A illustrates an example blockchain enabled operating environment100 in accordance with the configurations described herein. The exampleoperating environment 100 includes a user device 105 and a servicedevice 110. Furthermore, the example operating environment 100 includesa smart contract 115 on a decentralized blockchain 120 in communicationwith both the user device 105 and the service device 110. The userdevice 105 and the service device 110 are types of examples ofblockchain enabled computing devices for operation in the exampleoperating environment 100.

User Device

The user device 105 can be a device with the capability, inherent ormediated, to interact with a blockchain. As an example, a user device105 is a client device such as a smartphone, tablet, cell phone, laptop,or desktop computing device. In various embodiments, the user device 105communicates with the blockchain 120 through an application installed onthe user device 105 that includes a specific communication protocol.Transactions from the user device 105 execute value transfer to theservice device 110, as well as manage access control (for example,registering a booking for a location where the access to the location iscontrolled by the service device 110).

The user device 105 also may read parameters of a service device 110from the blockchain 120, as is further described herein. A parameter mayinclude, for example, a deposit, cost of rental or sale, availabilitydates and/or times, or other information relevant to complete and/orexecute a transaction. The information is read from a shared blockchainstate, structured in code in the form of a smart contract 115. A smartcontract 155 provides rules (e.g. computer program code, including, forexample, authorizations) to configure the service device 110 forexecution within the blockchain enabled operating environment.

In various example embodiments, the user device 105 also may communicatedirectly with the service device 110 through a communication protocolover any given wireless communication layer. For example, thecommunication may occur through BLUETOOTH or near field communication(NFC) technology using an application installed on the user device 105that includes a specific communication protocol.

Service Device

The service device 110 may represent an object with a capability,inherent or mediated, to interact with a blockchain. The service device110 may provide a service based on operating commands. For example, theservice device 110 may be structured to provide access control. Accesscontrol may include, for example ‘open’ and/or ‘close’ (e.g., a lock orlock mechanism), pass through permission (e.g., a gate), or ‘start’and/or ‘stop’ and/or ‘go up/down’ and/or ‘turn left/right’ (e.g.,operational functions). As more specific examples, a service device 110may provide a user of the user device 105 access to a hotel room (e.g.,by unlocking the door) and/or its equipment (e.g., minibar, television,room service) or a college dorm building (e.g., authorized entry).Alternatively, the service device may provide a user of the user device105 access to a location of interest such as a highway (e.g., by openinga gate).

As another example, the service device 110 may be structured to providean action that specifies a particular option amongst a variety ofoptions (e.g., beyond a simple binary ‘open/close’ option). For example,the service device 110 may be a coffee machine and can provide the userof the user device 105 a caffeinated beverage of various volumes (e.g.,small, medium, large, and/or other options). As another example, theservice device 110 may be configured to turn on a ceiling fan, and setthe speed of the ceiling fan to a particular rotations per minute. Theservices that can be provided by a service device 110 are not limited tothe aforementioned examples and may further include, but are not limitedto, on demand access to medical equipment, control of drones/vehicles,control of shipping containers, and any process that can be madeautonomous.

The service device 110 can have the necessary hardware and softwareon-boarded to be rented, sold and/or interacted with by the user device105. For example, the service device 110 may include communicationprotocols that are specific for communicating with the blockchain 120.In another embodiment, the service device 110 may not have direct accessto the blockchain 120 but can leverage a proxy device that includes theappropriate protocols to communicate with the blockchain 120. As oneexample, the proxy device is a rack server or a cloud server (e.g.,SAMSUNG ARTIK Cloud or a cloud service provided by a manufacturer of theservice device). In other words, the functions performed by proxy devicemay be distributed across multiple processors and/or electronic devices.In various embodiments, the one or more processors orprocessor-implemented modules may be distributed across a number ofgeographic locations. In some embodiments, the one or more processors ofthe proxy device may be located in a single geographic location (e.g.,within a home environment, an office environment, or a server farm). Inone embodiment, a proxy device can be a home server (e.g., a computingdevice) operating the necessary software to communicate with one or moreservice devices and sending the transactions to the blockchain 120. Anexample of the proxy device is described in further detail below inreference to FIG. 5A.

In one example embodiment, the service device 110 can provide a servicedirectly through electronically signed messages from the user device 105followed by a read request to the blockchain (to verify the user device105 is indeed allowed to access the service device 110). This scenariois described in further detail below in relation to FIG. 3. In oneembodiment, the service device 110 can provide a service by regularly“polling” the blockchain and providing the service upon a relevant statechange in the form of a modification to a value stored by the smartcontract 115. The modification of a value stored by the smart contract115 can be initiated by the user device 105. This scenario is describedin further detail below in relation to FIG. 4B.

The service device 110 can be discovered in two different ways. Thefirst, through a smart contract registry implemented as a smart contractitself. The second, through automatic discovery via blockchain analysisfor specific smart contract method (functions) signatures.

Smart Contract

Each service device 110 may be represented on a blockchain 120 (publicor private, regardless of implementation as long as it can de-centrallyexecute code) in the form of program code (or code). The code comprisesinstructions that are executable by a computer (or computer device) thatmay include, for example, a processor, controller or state machine. Thecode may include the rules for configuring particular computer deviceswithin the blockchain enabled operating environment to operate in aparticular way. The code in some example embodiments may be referred toas a smart contract 115. The service device's 110 condition ofoperations, triggered by a transaction from a user device 105, arestored and enforced in the smart contract 115. The smart contract 115also may hold optional variables, such as a reference to the owner ofthe service device 110 and/or the parameters governing conditions forthe operation of the service device 110 (e.g., deposit, cost of rentalor sale, availability dates and/or times, etc.). As one skilled in theart will readily recognize, the use of the phrase smart contract 115 isparticular to the field of blockchain technology, but can further referto any form of code that enforces an agreement. In this case, the smartcontract 115 enforces an agreement between a user device 105 (whoprovides a payment) and an owner's service device 110 (that provides aservice).

As an example of operation, the smart contract may manage access rightsto the service device 110. Referring to FIG. 1B, the smart contract 115,which operates on the blockchain 120, enables the transferring ofpayments/funds from a user device 105 that is requesting a service froma service device 110 that belongs to an owner 130 of the service device.The smart contract 115 may continuously update its stored values inresponse to receiving and/or paying out payments, e.g., conventionalcurrency in electronic form and/or a cryptocurrency payments. It isnoted that a cryptocurrency may be for example and electronic coinoffering, an electronic reward, a barter tender, or some other form ofvalue in electronic format.

By way of example, when the owner 130 of the service device desires tomake the service device 110 available to provide a service, the owner130 can provide a deposit amount and a price to access the servicedevice 110 that is recorded as variables in the smart contract. When auser device 105 has sent enough funds (e.g., provided a deposit) thatsatisfies the variables stored by the smart contract 115 representingthe service device 110, the user device 105 may in response transmit tothe service device 110 operating commands (e.g., in the form of programcode that comprises instructions) that may execute within the servicedevice 110 to perform a particular action. In various embodiments theuser device 105 and the service device 110 establish a state channelthat enables the user device 105 to transmit more than one operatingcommand to the service device 110. Further details entailing the logicbehind the smart contract 115 and access to the service device 110 isdescribed below.

By virtue of operating in a blockchain enabled environment, the smartcontract 115 may mediate the value transfers between the user device 105and the owner 130 of the service device (which can take place usingcurrency such as virtual currencies and/or tokens or equivalent).Therefore, the owner 130 of the service device may receive the payment(e.g., conventional currency in electronic format or a cryptocurrency)and the user device 105 receives the deposit back and/or any outstandingcredits from the payment.

Blockchain

Returning to FIG. 1A, the underlying blockchain 120 hosting the smartcontract 115 can be public or private. The blockchain 120 may include aledger in addition to the smart contract 115. The solution describedherein is blockchain 120 agnostic by design. As an example, theblockchain 120 refers to a decentralized network that facilitates wiredor wireless communications among one or more devices in communicationwith the blockchain 120 (e.g., user device 105 or service device 110)that de-centrally execute code.

In various embodiments, the network of the decentralized blockchain 120uses standard communication technologies and/or protocols. Examples oftechnologies used by the network include Ethernet, 802.11, 3G, 4G,802.16, or any other suitable communication technology. Examples ofprotocols used by the network include transmission controlprotocol/Internet protocol (TCP/IP), hypertext transport protocol(HTTP), simple mail transfer protocol (SMTP), file transfer protocol(FTP), or any other suitable communication protocol.

Example User Device, Service Device, and/or Device in Communication withBlockchain

FIG. 1C is a block diagram illustrating example components of an examplecomputing device 200 within the blockchain enabled operating environment100. Some or all of the example computing device components describedmay be within, for example, the user device 105, the service device 110,and/or any device that may be used by the user device 105 or servicedevice 110 as a proxy to communicate with the blockchain 120. In otherwords, the computing device 200 is a node on the blockchain 120. Thecomputing device 200 may be configured to read instructions from amachine-readable medium and execute them in at least one processor (orcontroller). Specifically, FIG. 1C shows a diagrammatic representationof a computing device 200 in the example form within which one or moreinstructions 224 (e.g., software or program or program product) forcausing the computing device 200 to perform any one or more of themethodologies discussed herein may be executed.

The example computing device 200 may include at least one processor 202(e.g., a central processing unit (CPU), a graphics processing unit(GPU), a digital signal processor (DSP), one or more applicationspecific integrated circuits (ASICs), one or more radio-frequencyintegrated circuits (RFICs), a controller, a state machine, or anycombination of these), a main memory 204, and a static memory 206, whichare configured to communicate with each other via a bus 208. Thecomputing device 200 may further include graphics display unit 210(e.g., a plasma display panel (PDP), a liquid crystal display (LCD), ora projector. The computing device 200 also may include input device, forexample, alphanumeric input device 212 (e.g., a keyboard), a cursorcontrol device 214 (e.g., a mouse, a trackball, a joystick, a motionsensor, touch sensitive interface, or other pointing instrument). Thecomputing device 200 also may include, for example, a storage unit 216(e.g., a solid state disk, a magnetic disk, an optical disk), a signalgeneration device 218 (e.g., a speaker), and a network interface device220, which also are configured to communicate via the bus 208. It isnoted that a computing device 200 need not include all the illustratedand described components of the computing device 200.

The storage unit 216 includes a machine-readable medium 222 on which isstored instructions 224 (e.g., software) embodying any one or more ofthe methodologies or functions described herein. The instructions 224(e.g., program code or software) may also reside, completely or at leastpartially, within the main memory 204 or within the processor 202 (e.g.,within a processor's cache memory) during execution thereof by thecomputing device 200, the main memory 204 and the processor 202 alsoconstituting machine-readable media. The instructions 224 (e.g.,software) may be transmitted or received over a network 226 via thenetwork interface device 220.

While machine-readable medium 222 is shown in an example embodiment tobe a single medium, the term “machine-readable medium” should be takento include a single medium or multiple media (e.g., a centralized ordistributed database, or associated caches and servers) able to storeinstructions (e.g., instructions 224). The term “machine-readablemedium” shall also be taken to include any medium that is capable ofstoring instructions (e.g., instructions 224) for execution by themachine and that cause the machine to perform any one or more of themethodologies disclosed herein. The term “machine-readable medium”includes, but not be limited to, data repositories in the form ofsolid-state memories, optical media, and magnetic media.

Operational Example for a Service Through a Blockchain Enabled System

FIG. 2 is an example interaction diagram that depicts a booking process,in accordance with an example embodiment. The booking process enables auser device 105 to gain access to a service device 110, in oneembodiment. More specifically, the user device 105 communicates with thesmart contract 115 representing the service device 110 on the blockchain120 in order to gain access to the service device 110 during the bookingprocess. After gaining access, the user device 105 proceeds through theaccess process in order to receive the service provided by the servicedevice 110. In the various embodiments described below, the accessprocess may differ whereas the booking process remains the same.

Example of the Booking Process Between User Device and Smart Contract

The user device 105 looks up 250 a smart contract 115 on the blockchain120 that represents the service device 110. As one example, the userdevice 105 can access a dynamic registry and identifies the smartcontract 115 and the corresponding service device 110. The dynamicregistry may be accessed from a third party system (e.g., anapplication/website, a hotel booking provider, or car rental bookingprovider).

The user device 105 gains access to the variables of the smart contract115 corresponding to the service device 110 which specifies theparameters of the service device 110 such as a payment deposit,availability dates of the service device, and/or other information.

The user uses his/her user device 105 to send 255 an electronicallysigned request to the smart contract 115 on the blockchain 120 topurchase permission to access the service device 110 (e.g., a lock,washing machine, car charging port, rental service, and any device thatcan provide a service). The user device 105 generates a request thatincludes a user identifier assigned to the user. For example, the useridentifier can refer to an identifier assigned to the user when the userregisters as a member of the blockchain. Additionally, the generatedrequest includes payment as well as variables that specifies the desiredparameters of the service.

The user device 105 electronically signs the request using a key (e.g.,a private/public key) that is assigned to the user. For example, theuser device 105 may electronically sign the request by encrypting therequest using the private key assigned to the user. In variousembodiments, the user device 105 may further include the public keyassigned to the user in the electronically signed request. Thus, theuser device 105 sends the electronically signed request.

The smart contract 115 on the blockchain 120 processes the requestprovided by the user device 105. The smart contract 115 on theblockchain 120 receives and decrypts the electronically signed request.For example, the electronically signed request is decrypted using theincluded public key of the user to obtain the content of the request(e.g., user identifier of the user, payments, and specified parameters).

The smart contract 115 determines 260 whether the conditions forproviding access are fulfilled. For example, the smart contract 115 onthe blockchain 120 checks whether the correct funds that satisfy thevariables of the smart contract 115 have been included in theelectronically signed request. As another example, if the user device issending an electronically signed request to rent a hotel room for aperiod of time, the smart contract 115 checks the parameters included inthe request that specify the dates of stay requested by the user andcompares the dates to dates of availability that are stored in thevariables of the smart contract 115 which were previously set by theowner of the service device 130. If the specified dates are available(e.g., no one is renting the hotel room at that time), the smartcontract 115 deems the conditions as fulfilled.

The smart contract 115 updates 265 its permission data structure toreflect that payment has been received from the user device 105 and thataccess to the service device 110 is now granted. As an example, thepermission data structure may be a key-value pair database that includesuser identifiers that have been granted access to the correspondingservice device 110. Therefore, the smart contract 115 can update thepermission data structure with the user identifier included in theelectronically signed request, thereby indicating that the useridentifier is granted access to the service device 110.

Given that the user device 105 has access to the blockchain 120 (e.g.,the user device 105 is a node on the blockchain 120), the user device105 continuously polls data from the blockchain 120 to update the localsynchronized copy of the blockchain 120 and verifies 270 that the accessrights to the service device 110 have been granted to the useridentifier. Thus, the booking process is complete.

Example of the Access Process Between User Device and Smart Contract

FIG. 3 is an example interaction diagram that depicts the accessprocess, in accordance with a first embodiment. The access processrefers to the process in which the user device 105 initiates a requestto the service device 110 and receives a service provided by the servicedevice 110. In the embodiment shown in FIG. 3, the user device 105 sendsa request directly to the service device 110. The service device canthen verify whether the user device 105 has the right to operate theservice device 110. In this embodiment, the service device 110 hasaccess to the blockchain 120 (e.g., is a node in the blockchain 120) andtherefore continuously polls data from the blockchain 120 to update alocally synchronized copy of the smart contract 115.

As shown in FIG. 3, the user device 105 sends 305 an electronicallysigned message to the service device 110 to request the service. To doso, the user device 105 generates a message. In various embodiments, themessage identifies the service device 110 and additional informationdescribing the requested service. Additionally, the message can includethe user identifier assigned to the user. The user device 105electronically signs the message by encrypting the message using aprivate key assigned to the user. The user device 105 can furtherinclude the public key assigned to the user in the electronically signedmessage.

The electronically signed message can be sent in response to differentuser inputs. For example, a user may open an installed application onthe user device 105 that includes communication protocols with theblockchain 120 and the service device 110 which then triggers theelectronically signed message. If the service device 110 can providemore than one service, the user can further provide input specifying theservice that is desired. The sending of the electronically signedmessage can occur over a wireless technology standard(Bluetooth/NFC/Wifi, all their variants and derivatives or similartechnology), using a communication protocol (ETHEREUM's WHISPER,TELAHASH, or any similar technology).

The service device 110 receives the electronically signed message andverifies 310 the signature of the electronically signed message. Forexample, the service device 110 may verify the signature throughcryptographic signature verification. Additionally, the service device110 may extract the user identifier by deriving it from the signedmessage. Here, the service device 110 can decrypt the electronicallysigned message using the public key and obtain the user identifier. Theservice device 110 verifies 315 that the user device 105 has beengranted access to the service device 110. For example, the servicedevice 110 retrieves the local, synchronized copy of the smart contract115 that is continuously polled from the blockchain 120. Therefore, theservice device 105 compares the extracted user identifier from theelectronically signed message to the user identifier that is listed inthe permission data structure of its local copy of the smart contract115.

Once the user identifier corresponding to the user device 105 isverified to have access to the service device 110, the service device110 provides 320 the requested service. Additionally, the service device110 may provide information to the user device 105 indicating that theservice was provided by the service device 110. Optionally, the userdevice displays 325 the outcome of the process (e.g., on a userinterface 230 of the user device 105) such as an indication that therequest was successful and the service was provided.

Operational Example of a Blockchain-Only Operation (e.g., FIG. 4A andFIG. 4B)

FIG. 4A depicts an example blockchain enabled operating environment, inaccordance with a second example embodiment. Here, FIG. 4A differs fromFIG. 1A in that the user device 105 and the service device 110 eachcommunicate with the blockchain 120 such that a service is provided bythe service device 110. In other words, in this mode of operation, auser uses his/her user client device 150 to receive a service providedby the service device 110 using solely transactions sent to the smartcontract 115 on the blockchain 120.

The user device 105 proceeds through the booking process as previouslydescribed in FIG. 2. During the access process, the user device 105emits a request through electronically signed messages to the blockchain120. The service device 110 regularly polls data from the blockchain 120to update its local, synchronized copy of the blockchain 120 foralteration of the state of a matching smart contract 115, and actsaccording, after verifying that a user identifier is authorized toconduct the operation requested as part of the request.

More specifically, reference is made to FIG. 4B which is an exampleinteraction diagram that depicts the access process, in accordance withthe second embodiment shown in FIG. 4A. The user device 105 can generatea message requesting a service from the service device 110. The messagecan include the user identifier assigned to the user of the user device105, an identification of the service device 110, and informationdescriptive of the service to be provided by the service device 110. Theuser device 105 electronically signs the message by encrypting themessage using the private key assigned to the user and further includesthe public key assigned to the user.

The user device 105 sends 450 the electronically signed messageincluding its public key to the smart contract 115 on the blockchain 120that represents the service device 110. The smart contract 115 on theblockchain 120 receives the electronically signed message, verifies theelectronically signed message (e.g., through cryptographic signatureverification methods), decrypts the electronically signed message usingthe public key, and extracts the user identifier. The smart contract 115verifies 455 that the extracted user identifier has access rights to theservice device 110. For example, the smart contract 115 accesses itspermission data structure as part of its storage and compares theextracted user identifier to the user identifier that is listed in thepermission data structure. The smart contract 115 queues up a servicedevice request as part of its internal data store.

The service device 110 has access to the blockchain 120 (e.g., a node inthe blockchain) and therefore stores a local, continuously synchronizedcopy of the smart contract 115. The service device polls 460 theblockchain 120 to update the locally synchronized copy with any statechanges that occurred in the corresponding smart contract 115 on theblockchain 120. For example, a state change may indicate that a new userdevice now has access to the service device 110. Additionally, a statechange may indicate an outstanding service device request that wasqueued up by the smart contract 115 on the blockchain 120.

If the service device 110 detects an outstanding service device request,the service device 110 provides the requested service. Optionally, theuser device displays 470 the outcome of the request such as anindication that the service has been provided. The user device mayobtain this information through regular polling of its own copy of theblockchain 120 and noting that the service device request that waspreviously queued up has now been completed.

Operational Example of a Proxy Device in Communication with One or MoreService Devices

FIG. 5A is an example interaction diagram that depicts the accessprocess using a proxy device, in accordance with an example embodiment.In this example embodiment, a proxy device 550 communicates on behalf ofone or more service devices 110. For example, the proxy device 550 maybe previously registered and pre-authorized to communicate with theservice device 110 (and one or more other service devices 110 as well).In such example embodiments, the implementation of a proxy device 550can be beneficial for service devices 110 that are not able to directlycommunicate with the blockchain 120. As previously described, the proxydevice 550 may be a computing device 200 configured to communicate withthe user device 105 and the smart contract 115 on the blockchain 120such that the user device 105 can request for a service and the proxydevice 550 can conduct the appropriate logic to cause the service device110 to provide the requested service.

The user device 105 proceeds through the booking process as previouslydescribed in FIG. 2. Referring specifically to the interaction diagramshown in FIG. 5A, during the access process, the user device 105transmits (or sends) 505 an electronically signed message including itspublic key to the proxy device 550. Such an electronically signedmessage can be generated by the user device 105 according to thedescription above in relation to step 450 of FIG. 4B. The proxy device550 receives the electronically signed message, extracts the useridentifier, and verifies 510 that the extracted user identifier hasaccess rights to the service device 110. Here, the proxy device hasaccess to the blockchain 120 (e.g., a node in the blockchain 120) andtherefore stores a local synchronized copy of the blockchain 120. Theproxy device verifies 515 that the extracted user identifier has accessrights by comparing the extracted user identifier to the local,synchronized copy of the smart contract that includes the useridentifier.

Once the proxy device 550 has verified that the user device 105 hasaccess to the service device 110, the proxy device 550 transmits anoperational request to the service device 110. In response to theoperational request, the service device provides 520 the service. Theservice device 110 transmits, back to the proxy device 550, a responseto the operational request indicating that the service has beenprovided. The proxy device 550 may further transmit the response to theuser device 105. The user device 105 can optionally provide for display525 the outcome of the operation.

FIG. 5B depicts an example of hardware and software layers of a proxydevice, in accordance with an example embodiment. As stated above, invarious embodiments, the proxy device is a cloud server. Therefore, thehardware layer of the proxy device, which can include the processors ofthe proxy device, can be distributed across multiple geographicallocations. Generally, the hardware and/or software layers enable theproxy device 550 to communicate with the blockchain 120. The blockchain120 may execute on one or more distributed computing devices and mayinclude one or more smart contracts 115 and a distributed ledger (e.g.,blockchain 120).

By way of example, the proxy device 550 may include hardware (e.g.,embedded board processor such as RASPBERRY PI, INTEL EDISON, SAMSUNGARTIK, etc.) and/or the various devices described in FIG. 2A such as theprocessor 202, graphics display 210, and machine readable medium 222configured to enable communication between the blockchain 120 and aservice device 110 that may or may not have direct access to theblockchain 120. The proxy device 550 also includes an operating system.For example, example of an operating system used by the proxy device 550is the UBUNTU Snappy core. In another example, the operating system usedby the proxy device 550 may be GOOGLE ANDROID or APPLE IOS. Through theoperating system, the proxy device 550 can communicate with one or moredifferent service devices 110. For example, the proxy device 550 candetect and communicate with all compatible service devices 110 that areavailable (e.g., in a home, in a hotel) through an application orcommunication protocols. Therefore, an owner of the proxy device 550 canset the parameters (e.g., deposit, cost of rental, time availability)for each of the service devices 110 that are in communication with theproxy device 550.

Additionally, the proxy device 550 includes a software framework thatenables communication with the blockchain 120. For example, the proxydevice 550 may include a software framework that communicates with acontroller application that may enable communication between one or morethird party applications and the software framework layer thatcommunicates with the blockchain 120. Additionally, the proxy device 550may include a user interface that can receive user inputs.

Operational Example Including the Employment of State Channels

FIG. 6 depicts an access process flowchart detailing an embodiment thatincludes the use of state channels. A state channel enablescommunications such that the user device 105 can send multipletransactions for multiple different services (or repeated services) froma service device 110 (or multiple service devices belonging to the sameowner). Therefore, the user device 105 and service device 110 tally thecosts associated with the provided services over the state channel andcan settle the multiple transactions through a single payment via asmart contract 115 on the blockchain 120 when the state channel isclosed.

As one example, the service device 110 may be a lock which may need tobe locked/unlocked multiple times over a time period. Therefore, insteadof settling a payment with the smart contract 115 on the blockchain 120after every lock/unlock, the service device 110 can settle after thestate channel is closed. In various embodiments, a state channel can beclosed after a pre-determined amount of time or pre-determined number oflocks/unlocks.

Although FIG. 6 depicts state channel communications between a userdevice 105 and a single service device 110, one skilled in the art mayalso appreciate that state channels can be employed in relation to aproxy device 550 (e.g., as described in FIG. 5A). Therefore, the userdevice 105 may provide multiple requests to the proxy device 550 acrossa state channel that is open between the user device 105 and the proxydevice 550. Therefore, the proxy device 550 may verify the multiplerequests and appropriately instruct the service device 110 to providethe requested services. The user device 105 and the proxy device 550 maysettle the payment for the provided services after the state channel isclosed.

As a specific example, the proxy device 550 may be placed in a hotelroom. The services that the hotel room can provide may include, but arenot limited to, unlocking the door to provide access to the room,providing access to drinks in the mini-fridge of the hotel room,providing access to a movie on the television of the hotel room, and/orchecking out of the hotel room after the stay is over. Each servicecorresponds to a service device 110 in the hotel room that is incommunication with a proxy device 550 of the hotel room. In thisscenario, a user device 105 can employ state channels that enablecommunication between the user device 105 and the proxy device 550 incommunication with multiple service devices 110. Therefore, the smartcontract 115 on the blockchain 120 receives a single payment formultiple services provided by service devices 110 in communication witha proxy device 550 when the state channel is closed.

Referring to the interaction diagram shown in FIG. 6, the user devicetransmits 605 an electronically signed message to the service device 110(or the proxy device 550). Here, the user device 105 generates a messagethat requests the service device 110 to open a state channel. In variousembodiments, the message can include the user identifier assigned to theuser of the user device 105. Additionally, the message may includedetails such as how long the state channel is to remain open (e.g.,duration or maximum cost or number of provided services). The userdevice 105 electronically signs the message by encrypting the messageusing the private key assigned to the user and further includes thepublic key assigned to the user.

The service device 110 receives the electronically signed message,verifies 610 the signature of the message request, and extracts the useridentifier. For example, the service device 110 performs a cryptographicsignature validation to verify the electronically signed message. Theservice device 110 decrypts the signed message using the public key andextracts the user identifier. The service device 110 verifies 615 thatthe extracted user identifier has access rights to the service device byquerying the locally stored synchronized copy of the blockchain.

Once the service device 110 has verified that the user device 105 hasaccess to the service device, the service device opens 620 the statechannel. Optionally, the user device 105 may provide for display 625 theoutcome of the opening of the state channel to inform the user. Whilethe state channel remains open between the user device 105 and theservice device 110, the user device 105 can request 630 for one or moreservices of the service device 110 by sending one or more signedmessages. The service device 110 can provide 635 the requested one ormore services in response to the request from the user device 105 due tothe fact that the signed request was received through a state channel.During this time, the user device 105 and service device 110 manages atally of the services that have been provided since the state channelwas opened. Steps 630 and 635 may continue until the state channel isclosed. The closing of a state channel may be due to a pre-determinedexpiration of the state channel due to time (e.g., end of the day) ordue to a total number of services (e.g., close after providing tenservices), but also if a predetermined total cost of operating theservices has been reached, and so forth. In some embodiments, uponclosure of the state channel, the costs of the provided services aresettled via a smart contract 115 on the blockchain 120. In other exampleembodiments, the user device 105 or service device 110 need not waituntil the state channel is closed and can settle the costs of theprovided services at a pre-determined interval.

Operational Example of a Gateway Client Device

Referring to FIGS. 7A and 7B, in another embodiment the service device110 may not have the capability to directly communicate with theblockchain 120. For example, the service device 110 may be withoutinternet connectivity. Therefore, the service device 110, also referredto as an IoT device in FIG. 7A, employs the internet capable, userdevice 105, also referred to as a gateway in FIG. 7A, to communicatewith a trusted client 704 in FIG. 7A, that has access to the blockchain120.

The service device 110 itself does not need to have an internetconnection enabled. It can communicate with the user device 105 viaother communication mediums. For example, communication may beestablished via BLUETOOTH, near field communication (NFC), or any othersimilar technology as long as this communication channel enablesbi-directional sending of messages. The service device 110 can furtherinclude a memory that stores a whitelist that includes information oftrusted clients 710. Additionally, the service device 110 can validatecryptographic signatures, such as a cryptographic signature included asa part of a request from the user device 105.

The gateway 702 may be any device and can support a communicationchannel (e.g., BLUETOOTH, NFC) with the service device 110. An exampleof the gateway 702 can be the user device 105. In some embodiments, thegateway 702 can hold a public/private key pair and signs messages withthe public key. Therefore, the gateway 702 can initiate thevalidation-process by sending a signed message to the service device110. The gateway 702 offers its internet connection to the servicedevice 110 in order to connect to the blockchain 120 using trustedclients 710.

Trusted clients 710 may be services offered by many different hostswhich give access to the blockchain 120. Each trusted client 704 canoperate as a node in the blockchain 120 which is always synced (using aclient similar to geth, eth, parity, and the like). Additionally, eachtrusted client 704 has access to a private key and can sign requests.

During set up, the owner of the service device 110 deploys a smartcontract 115 on the blockchain 120 for the service device 110. Here,values can be written into the storage (e.g., memory) of the servicedevice 110. Values can include an initial whitelist of trusted clients704, as set by the owner of the service device.

Referring to FIG. 7B, it depicts the process of enabling blockchainaccess by the service device 110 through the user device 105 and trustedclient 704, in accordance with an example embodiment. Specifically, asshown in FIG. 7B, the service device 110 (IoT device) maintains 705 awhitelist of certificates that manages a list of trusted clientinstances which are considered secure. The whitelist can includeinformation of the trusted clients 710 such as the internet protocoladdress of the trusted client 704 and port/public key of the trustedclient 704. The whitelist itself may be stored as smart contract 115 onthe blockchain 120. This whitelist may be managed by either a foundationor group of users using a multisig to decide about each node instance orby corporates which could use it in order to centrally control a list ofnodes. In order to make sure the whitelist is always up-to-date andcontains no failed or non-existing nodes, a cronjob or similar mayobserve the entries in the list and run test-requests comparing theresults with an independent client. In case the results do not match,this client is removed from the list.

The service device 110 first verifies the gateway 702 device (steps710-730). The gateway 702 establishes 710 a connection with the servicedevice. The service device generates 715 a random number (e.g., a randomseed) and sends 720 the random seed to the gateway. This seed willensure that messages cannot be reused and prevents a man in themiddle-attack.

An example of a request to establish a connection (e.g., step 710) sentby the gateway 702 may be:

{ “jsonrpc”: “2.0”, “method”: “request”, “params”: [] “id”:”1” }A response from service device that includes the random seed (e.g., step720) can be expressed as:

{    “jsonrpc”: “2.0”,    “result”: { “seed” : “12AE3B6F3AD76E5B2” }   “id”:”1”    }

Once the gateway has received the seed, the gateway sends 725 a signedmessage. This can occur through Bluetooth, NFC, or any similartechnology. The generation of such a message could take the followingform:

-   -   var msgFlash=seed+sender+method;    -   ethUtil. ecsign (msgHash, privateKey)        leading to the creation of the following signed message:

{ “jsonrpc”: “2.0”, “method”: “open”, “params”: {     “sender” :“5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab”,    “v”: “1c”,     “r”:“5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab”,    “s”:“5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13” }“id”:”1” }

The service device 110 may verify 730 the signed message from thegateway 702. For example, the service device 110 can derive the publickey from the gateway's signed message. This verification could take theform of the following pseudo code:

-   -   senderPubKey=ethUtil.ecrecover (msgHash,v,r,s)

If the public key derived from the above matches the key passed as partof the message, the service device confirms that the message was indeedsent by the gateway 702 specified in the message.

After verifying the gateway's identity, the service device 110determines whether the owner of this public key is also authorized touse the service device 110. The service device 110 selects 735 a trustedclient 704 that is maintained on its whitelist and generates 740 arequest that is sent 745 to the gateway 702. Here, a request that issent to the gateway 702 can be a request to poll the smart contract 115stored on the blockchain 120 to check whether there is a state change(e.g., see step 460).

The generation of such a request could take the following form:

function hasPermission (address user, uint commandCode) constant returns(boolean is-allowed) And the request (e.g., request sent at step 745)itself may be represented by the following pseudocode:

{ “jsonrpc”: “2.0”, “method”: “eth_call”, “params”: [{     // address ofthe smart contract controlling the device     “to” :“5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab”,    // Hash of the method signature and encoded parameters (user,commandCode).     “data”:“220eafc8c79ad578ad2b67d01b0c24255e1d3a76fbf82423BAF9eb1f1347e8f50882ab”}] “id”:”2”, “client” : “10.25.125.196:8555”, “seed” :“8c79ad578ad2b67d01b0c24255e1d” }

When the gateway 702 receives such a request including a client and seedparameters, it will establish an HTTP (or https) connection to thespecified trusted client 704 and forward 750 the request. The requestmay take the form of a POST request to the server hosting the trustedclient 704. This request will be received by the trusted client 704which will then execute the Service Device's query on the trusted client752. The trusted client 704 generates 755 a signed response in the formof a message signed using the trusted client's private key. Thegeneration of such a response could take the following form:

-   -   var msgHash=crypto.SHA256 (request. method+JSON.stringify        (request. params)+request. seed    -   +JSON.stringify (response. result));    -   ethUtil. ecsign (msgHash, privateKey)

The response message (e.g., generated at step 755) may contain theresult of query, may add a signed field, and may be represented by thefollowing pseudocode:

{ “jsonrpc”: “2.0”, “result”: “0xl”, “sign”: {     “v”: “1c”,     “r”:“5e1d3a76fbf824220eafc8c79ad578ad2b67d01b0c2425eb1f1347e8f50882ab”,    “s”:“5bd428537f05f9830e93792f90ea6a3e2d1ee84952dd96edbae9f658f831ab13” },“id”:”2” }As an example, the response message (e.g., generated at step 755) mayinclude the changes to the smart contract 115 or can include a queuedservice device request. Therefore, when this information is received bythe service device 110, the service device 110 can update its locallystored smart contract 115 with the changes to the smart contract 115 orprovide a service in response to the queued service device request.

The trusted client sends (or transmits) 760 this signed message to thegateway 702 which then forwards 765 this response to the service device110. The service device 110 verifies 770 the signature of the trustedclient 704 in the received data package. This may be done by extractingthe public key of the trusted client 704 from the message and comparingit to one stored in the service device's 110 whitelist.

In one embodiment, the service device 110 returns a message to thegateway 702 if the signature of the message is valid. The returnedmessage to the gateway 702 could include a success or failure result,depending on whether or not the query by the trusted client 704 wassuccessful, and could take the form of the following pseudocode:

{  “jsonrpc”: “2.0”,  “result”: true  “id”:”1” }Additional Considerations

The disclosed embodiments of the blockchain enabled environment enablesthe accessing of services from various service devices while leveragingthe decentralized blockchain. The benefits of the disclosed embodimentsare several-fold.

By way of example, an implementation of a smart contract on thedecentralized blockchain that governs a particular service deviceensures the secure exchange of services and payments. For example, as adistributed ledger, the blockchain can ensure that the payments areimmutably recorded on the distributed ledger.

Also by way of example, an ability for a user device to leverage thedecentralized blockchain ensures that a user of the user device canreadily access a service device without the need for a middle man. As aparticular example, a user of a user device can provide payments to asmart contract corresponding to a hotel room on the blockchain.Therefore, the user can book the hotel room for a particular range ofdates. When the user arrives at the hotel room, instead of having tocheck in at a front desk to obtain keys to the hotel room, the user canuse the user device to gain access to the hotel room by unlocking lockof the hotel room (e.g., the service device).

The foregoing description of the embodiments of the invention has beenpresented for the purpose of illustration; it is not intended to beexhaustive or to limit the invention to the precise forms disclosed.Persons skilled in the relevant art can appreciate that manymodifications and variations are possible in light of the abovedisclosure.

Some portions of this description describe the embodiments of theinvention in terms of algorithms and symbolic representations ofoperations on information. These algorithmic descriptions andrepresentations are commonly used by those skilled in the dataprocessing arts to convey the substance of their work effectively toothers skilled in the art. These operations, while describedfunctionally, computationally, or logically, are understood to beimplemented by computer programs or equivalent electrical circuits,microcode, or the like. Furthermore, it has also proven convenient attimes, to refer to these arrangements of operations as modules, withoutloss of generality. The described operations and their associatedmodules may be embodied in software, firmware, hardware, or anycombinations thereof.

Any of the steps, operations, or processes described herein may beperformed or implemented with one or more hardware or software modules,alone or in combination with other devices. In one embodiment, asoftware module is implemented with a computer program productcomprising a computer-readable medium containing computer program code,which can be executed by a computer processor for performing any or allof the steps, operations, or processes described.

Embodiments of the invention may also relate to an apparatus forperforming the operations herein. This apparatus may be speciallyconstructed for the required purposes, and/or it may comprise ageneral-purpose computing device selectively activated or reconfiguredby a computer program stored in the computer. Such a computer programmay be stored in a non-transitory, tangible computer readable storagemedium, or any type of media suitable for storing electronicinstructions, which may be coupled to a computer system bus.Furthermore, any computing systems referred to in the specification mayinclude a single processor or may be architectures employing multipleprocessor designs for increased computing capability.

Embodiments of the invention may also relate to a product that isproduced by a computing process described herein. Such a product maycomprise information resulting from a computing process, where theinformation is stored on a non-transitory, tangible computer readablestorage medium and may include any embodiment of a computer programproduct or other data combination described herein.

Finally, the language used in the specification has been principallyselected for readability and instructional purposes, and it may not havebeen selected to delineate or circumscribe the inventive subject matter.It is therefore intended that the scope of the invention be limited notby this detailed description, but rather by any claims that issue on anapplication based hereon. Accordingly, the disclosure of the embodimentsof the invention is intended to be illustrative, but not limiting, ofthe scope of the invention, which is set forth in the following

What is claimed is:
 1. A method comprising: receiving an electronicallysigned request from a user device to access a service device; verifyingthat the electronically signed request satisfies a condition for access;updating a permission data structure specific for the service devicestored on a decentralized ledger to permit the user device to access theservice device; receiving, over a length of time, a plurality ofrequests from the user device through a state channel for a serviceprovided by the service device, the receiving of the plurality ofrequests comprising receiving, from the user device, an electronicallysigned message requesting for the service to be provided by the servicedevice, the signed message comprising a user identifier corresponding tothe user device; authorizing, for each request in the plurality, theservice to the user device, the authorizing including: verifying thatthe user device is authorized to access the service device based on theuser identifier included in the signed message; and generating,responsive to the verification, a service device request for the servicedevice, wherein the changes provided to the service device comprise theservice device request that causes the service device to provide theservice; detecting that an expiration condition of the state channel hasbeen met; responsive to detecting that the expiration condition of thestate channel has been met: providing a request indicating a totalnumber of services provided during the length of time for the pluralityof requests received through the state channel; and receiving a requestto settle a payment for multiple services provided by the servicedevice.
 2. The method of claim 1, wherein verifying that the user deviceis authorized to access the service device based on the user identifierincluded in the signed message comprises: extracting the user identifierfrom the signed request; accessing the updated permission data structurespecific for the service device; and comparing the extracted useridentifier to the plurality of user identifiers stored in the permissiondata structure.
 3. The method of claim 2, wherein extracting the useridentifier comprises: decrypting the signed request using a public keyassigned to the user identifier.
 4. The method of claim 1, whereinverifying that the electronically signed request satisfies a conditionfor access comprises: accessing a contract stored on the decentralizedledger, the contract specific for the service device; and comparingvariables of the accessed contract to one or more parameters of theelectronically signed request.
 5. The method of claim 1, wherein one ormore parameters of the electronically signed request include one of apayment, availability dates, or availability times.
 6. The method ofclaim 1, wherein updates to the permission data structure are providedto one of the user device, the service device, or a proxy device toupdate the permission data structure.
 7. The method of claim 1, whereina request of the plurality requests is to lock or unlock a device.
 8. Anon-transitory computer readable storage medium comprising memory withinstructions encoded thereon, the instructions, when executed, causingone or more processors to perform operations, the instructionscomprising instructions to: receive an electronically signed requestfrom a user device to access a service device; verify that theelectronically signed request satisfies a condition for access; update apermission data structure specific for the service device stored on adecentralized ledger to permit the user device to access the servicedevice; receive, over a length of time, a plurality of requests from theuser device through a state channel for a service provided by theservice device, the receiving of the plurality of requests comprisingreceiving, from the user device, an electronically signed messagerequesting for the service to be provided by the service device, thesigned message comprising a user identifier corresponding to the userdevice; authorize, for each request in the plurality, the service to theuser device, the authorizing including: verifying that the user deviceis authorized to access the service device based on the user identifierincluded in the signed message; and generating, responsive to theverification, a service device request for the service device, whereinthe changes provided to the service device comprise the service devicerequest that causes the service device to provide the service; detectthat an expiration condition of the state channel has been met;responsive to detecting that the expiration condition of the statechannel has been met: provide a request indicating a total number ofservices provided during the length of time for the plurality ofrequests received through the state channel; and receive a request tosettle a payment for multiple services provided by the service device.9. The non-transitory computer-readable medium of claim 8, wherein theinstructions to verify that the user device is authorized to access theservice device based on the user identifier included in the signedmessage comprise instructions to: extract the user identifier from thesigned request; access the updated permission data structure specificfor the service device; and compare the extracted user identifier to theplurality of user identifiers stored in the permission data structure.10. The non-transitory computer-readable medium of claim 9, wherein theinstructions to extract the user identifier comprise instructions to:decrypt the signed request using a public key assigned to the useridentifier.
 11. The non-transitory computer-readable medium of claim 8,wherein the instructions to verify that the electronically signedrequest satisfies a condition for access comprise instructions to:access a contract stored on the decentralized ledger, the contractspecific for the service device; and compare variables of the accessedcontract to one or more parameters of the electronically signed request.12. The non-transitory computer-readable medium of claim 8, wherein oneor more parameters of the electronically signed request include one of apayment, availability dates, or availability times.
 13. Thenon-transitory computer-readable medium of claim 8, wherein updates tothe permission data structure are provided to one of the user device,the service device, or a proxy device to update the permission datastructure.
 14. The non-transitory computer readable storage medium ofclaim 8, wherein a request of the plurality requests is to lock orunlock a device.
 15. A system comprising: memory with instructionsencoded thereon; and one or more processors that, when executing theinstructions, are caused to perform operations comprising: receiving anelectronically signed request from a user device to access a servicedevice; verifying that the electronically signed request satisfies acondition for access; updating a permission data structure specific forthe service device stored on a decentralized ledger to permit the userdevice to access the service device; receiving, over a length of time, aplurality of requests from the user device through a state channel for aservice provided by the service device, the receiving of the pluralityof requests comprising receiving, from the user device, anelectronically signed message requesting for the service to be providedby the service device, the signed message comprising a user identifiercorresponding to the user device; authorizing, for each request in theplurality, the service to the user device, the authorizing including:verifying that the user device is authorized to access the servicedevice based on the user identifier included in the signed message; andgenerating, responsive to the verification, a service device request forthe service device, wherein the changes provided to the service devicecomprise the service device request that causes the service device toprovide the service; detecting that an expiration condition of the statechannel has been met; responsive to detecting that the expirationcondition of the state channel has been met, providing a requestindicating a total number of services provided during the length of timefor the plurality of requests received through the state channel; andreceiving a request to settle a payment for multiple services providedby the service device.